package com.sf.fy.uav.common.enums;

import lombok.Getter;

/**
 * @author ta136817
 */

@Getter
public enum UserCompanyValidityPeriodTypeEnum {
    /**
     * 优惠券定向发放状态枚举
     */
    LONG_TERM("长期", (byte) 0),
    TIME_PERIOD("时间段", (byte) 1);
    private String desc;
    private Byte value;

    public void setValue(Byte value) {
        this.value = value;
    }

    UserCompanyValidityPeriodTypeEnum(String desc, Byte value) {
        this.desc = desc;
        this.value = value;
    }


    public void setDesc(String desc) {
        this.desc = desc;
    }

    public static String getDesc(Byte value) {
        for (UserCompanyValidityPeriodTypeEnum ele : values()) {
            if (ele.getValue().equals(value)) {
                return ele.getDesc();
            }
        }
        return null;
    }

}
